<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/4/26
  Time: 14:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/web_top.jsp" %>
<title>历史合同</title>
<div ng-include="loanIng" class="includeStyle ">

    <div class="bgSortScroll">
        <!-- ngIf: HbHr.hr109 -->
        <div class="public-bgContent "   ng-if="HbHr.hr109">
            <!--表单搜索-->
            <div class="public-bgDate">
                    <span><input type="text" autocomplete="off" id="PoInput-formDate" ng-focus="remHight()"
                                 ng-class="{'error':redErr.dateTime}" placeholder="开始时间" ng-model="param.beginTime"
                                 class="datepicker ng-pristine ng-untouched ng-valid ng-empty"><i
                            class="iconfont icon-riqi"></i></span>
                <em>&nbsp;&nbsp;~&nbsp;&nbsp;</em>
                <span><input type="text" autocomplete="off" id="PoInput-toDate" ng-focus="remHight()"
                             ng-class="{'error':redErr.dateTime}" placeholder="结束时间" ng-model="param.endTime"
                             class="datepicker ng-pristine ng-untouched ng-valid ng-empty"><i
                        class="iconfont icon-riqi"></i></span>
                <div class="se-re">
                    <select id="seleNames" ng-model="param.type" ng-class="{'error':redErr.seleName}"
                            ng-focus="remHight()" ng-change="changeName()"
                            class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">选择字段</option>
                        <option value="1">借款编号</option>
                        <option value="2">客户姓名</option>
                        <option value="3">手机号码</option>
                        <option value="4">身份证号码</option>
                        <option value="5">业务员姓名</option>
                    </select>
                    <span class="se-po"></span>
                </div>
                <span>
			<input type="text" autocomplete="off" id="inputNames" placeholder="请输入关键字" ng-focus="remHight()"
                   ng-model="param.keyword"
                   class="ng-pristine ng-untouched ng-valid ng-empty">
		</span>
                <div id="history_head_date" style="display: inline-block"></div>
                <script type="x-handlebars-template" id="history_head_date_tpl">
                    <div class="se-re">
                        <select id="history_headSelect" ng-options="a.id as a.atName for a in fenQi"
                                ng-model="param.atId"
                                class="ng-pristine ng-untouched ng-valid ng-empty">
                            <option value="" class="" selected="selected">分期</option>
                            {{#each content}}
                            <option label="{{atName}}" value="{{id}}">{{atName}}</option>
                            {{/each}}
                        </select>
                        <span class="se-po"></span>
                    </div>
                </script>
                <div class="se-re">
                    <select id="loan_way" ng-model="param.loan_way" class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">贷款方式</option>
                    </select>
                    <script type="text/x-handlebars-template" id="loanMethod_list_tpl">
                        {{#each content}}
                        <option value="{{id}}">{{name}}</option>
                        {{/each}}
                    </script>
                    <span class="se-po"></span>
                </div>
                <div class="se-re">
                    <select id="product_choose_list" class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="">选择产品</option>
                        <%--<option value="1">按揭短拆</option>
                        <option value="2">红本抵押</option>
                        <option value="3">红本质押</option>--%>
                    </select>
                    <span class="se-po"></span>
                </div>
                <button id="historySeach">
                    <i class="iconfont icon-sousuo"></i>
                </button>
            </div>
            <!--提示操作-->
                 <div class="public-bghint">
                    <span ng-click="show()" style="cursor: pointer;">提示操作</span>
                    <i class="iconfont icon-icon-copy-copy"></i>
                    <span class="calNum">筛选<span class="" id="total">{{content.total}}</span>条结果</span>
                </div>
                <ul class="public-ulList" ng-show="loanIngShow">
                    <li>显示拥有该栏目管理权限的数据；</li>
                    <li>拥有权限的管理员会显示对应的操作按钮；</li>
                    <li>显示所属分公司下的所有业务员的合同</li>
                </ul>
                <div style="height: 20px;"></div>
                <!--tabel 列表-->
                <div class="table-scroll">
                    <table class="table public-table PoInput">
                        <thead>
                        <tr>
                            <td>选择</td>
                            <td>创单时间</td>
                            <td>借款编号</td>
                            <td>客户姓名</td>
                            <td>期限</td>
                            <td>借款金额</td>
                            <td>合同编号</td>
                            <td>业务员</td>
                            <td>部门</td>
                            <td>状态</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody id="history_content">
                        </tbody>

                        <tfoot class="public-botPage">
                        <tr>
                            <td>
                                <!-- 全选反选  -->
                                <input type="checkbox" class="all_checked" ng-click="F.ch_id_all($event,'ch_id')">
                            </td>
                            <td colspan="12">
                                <div class="public-botPage-left">
							<span>
								<span>全选</span>
							</span>
                                    <div class="se-re">
                                        <select id="allDown_select" class="tabHint">
                                            <option value="-1">批量操作</option>
                                            <!-- ngIf: HbHr.hr111 -->
                                            <option ng-if="HbHr.hr111" value="下载合同" path="loanIng" params="lotsLoad"
                                                    param="id:" class="">下载合同
                                            </option><!-- end ngIf: HbHr.hr111 -->
                                        </select>
                                        <span class="se-po"></span>
                                    </div>
                                </div>
                                <div class="page-container historyList-page-container"
                                     style="float: right; padding: 15px 30px;"></div>

                            </td>
                        </tr>
                        </tfoot>
                    </table>
                    <!--底部操作-->
                </div>

        </div><!-- end ngIf: HbHr.hr109 -->
    </div>
</div>

<div class="winBox orderBreachWinBox" style="display: none;">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
        <div class="winBox3 ">
            <div class="lotsload">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">订单毁约</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div class="deleBox topbox">
                    <!-- 中间列表 -->
                    <table class="resultTab">
                        <tbody>
                        <tr>
                            <td><span style="color: #D5332C;">*</span>毁约金额</td>
                            <td class="unload">
                                <span class="em"><input id="breachMoney" ng-focus="remHight()"
                                                        ng-class="{'error':redErr.money}" type="text"
                                                        ng-model="param.renege_money"
                                                        class="ng-pristine ng-untouched ng-valid ng-not-empty"></span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="beizhu"><span>*</span>备注</div>
                    <textarea id="breachMoneyText" ng-focus="remHight()" ng-class="{'error':redErr.remarks}"
                              ng-model="param.remarks" data-tag="textLength" showtag="zishuxians"
                              class="ng-pristine ng-untouched ng-valid ng-empty ng-valid-maxlength"></textarea>
                    <!-- 底部 -->
                    <div class="deleFooter">
                        <div class="deleBtn">
                            <button id="breachCommit">确定提交</button>
                            <%--<button ng-click="F.showWin('hide')">取消</button>--%>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="winBox package_winBox">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box --><div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
    <div class="winBox3 ">
        <div class="lotsload">
            <div class="downChose downloading">
                <div class="headerBox">
                    <span class="headerSpan">批量下载</span>
                    <!--<i class="iconfont icon-wrong headerIcon" ng-click="showWin('hide')"></i>-->
                </div>
                <!-- 内容 -->
                <div class="deleBox">
                    <!-- 底部 -->
                    <div class="prog-text">下载中建议不要关闭该页面，下载成功弹窗会自动隐藏！</div>
                    <div class="prog-prog">
				<span class="prog-f">
					<span class="prog-c" style="width: 376px;"></span>
				</span>
                        <span class="prog-rate"><i class="">0</i>%</span>
                    </div>

                </div>
            </div>

            <div class="lotsload downloaded">

                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">批量下载</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="closeRef()"></i>
                </div>
                <div class="resultBox">
                    <div class="centerBox" style="max-height: 600px; overflow-y: auto;">
                        <div class="resultPadd">
                            <div class="deleteTit">
                                <span class="frist"><i class="iconfont icon-zhengque1"></i></span>
                                <span>已打包，压缩包里面包含如下文件！</span>
                            </div>
                            <div class="beizhu beizhu-pq"><span>*</span>打包明细</div>
                            <table class="dataListTab D-loan-table">
                                <thead>
                                <tr>
                                    <td style="width: 0%!important;">文档名称</td>
                                    <td>大小</td>
                                    <td>状态</td>
                                </tr>
                                </thead>
                                <tbody id="detail_list">
                                </tbody>
                            </table>
                            <script type="text/x-handlebars-template" id="detail_list_tpl">
                                {{#each contractList}}
                                {{#each this}}
                                {{#IF_EQ isExists 1}}
                                <!-- ngRepeat: item in data.downloadC.content.contractList --><tr ng-repeat="item in data.downloadC.content.contractList" class="">
                                    <td style="width: 0%!important;" class="">{{name}}</td>
                                    <td class="">{{size}}</td>
                                    <td ng-if="item.state=='正常'" class=""><i class="iconfont icon-zhengque1" style="color:rgb(122,202,124);"></i></td><!-- end ngIf: item.state=='正常' -->
                                </tr>
                                {{/IF_EQ}}
                                {{/each}}
                                {{/each}}
                            </script>
                            <!-- tab列表结束
                            <!-- 底部 -->
                            <div class="deleFooter">

                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div></div>
</div>

    <script id="history_content_tpl" type="x-handlebars-template">

    {{#if content.content.list}}
    {{#each content.content.list}}
    <tr ng-repeat="i in data.content.list" ng-click="F.tabClick($event)"
        class="table-tr-hover ">
        <td><input type="checkbox" name="ch_id" value="{{id}}"></td>
        <td class="">{{found_time}}</td>
        <td class="">{{loan_number}}</td>
        <td class="">{{personal_name}}</td>
        <td class="">{{#IF_EQ repayment_way '4'}}{{at_id}}天{{else}}{{term}}{{/IF_EQ}}</td>
        <td class="">￥{{#thounsandBit apply_money}}{{/thounsandBit}}</td>
        <td class="yellowBg"><span class="">{{contract_no}}</span></td>
        <td class="">{{admin_name}}</td>
        <td class="">
            {{#if d3_name}}{{d3_name}}&gt;{{/if}}
            {{#if d2_name}}{{d2_name}}&gt;{{/if}}
            {{d1_name}}
        </td>
        <td class="">{{s_name}}</td>
        <td class="big-last-td">
            <div class="se-re sel-blue">
                <select ng-click="F.stopPropagation($event)" data-productid="{{product_id}}"
                        class="orderBreachSelect tabHint tt707 ng-not-empty" data-id="{{id}}"
                        ng-model="selectType.default" ng-change="F.selectQuery('tt707')">
                    <option value="-1" selected="selected">选择操作</option>
                    <!-- ngIf: HbHr.hr110 -->
                    {{#each ../fourthMenus}}
                    <option value="{{key}}"{{#IF_EQ key 'orderBreak'}}{{#IF_NEQ ../../s_id 1}}style="display:none"{{/IF_NEQ}}{{/IF_EQ}}>{{name}}</option>
                    <%--<option ng-if="HbHr.hr110" value="1" data-type="1" path="common"
                            data-id="{{id}}"
                            data-productid="{{product_id}}"
                            params="orderShow"
                            param="id:707,locat:1,s_id:15,orderHead:ContractMng,nowPage:historyList"
                            class="">查看订单
                    </option><!-- end ngIf: HbHr.hr110 -->
                    <!-- ngIf: HbHr.hr295 && i.s_id < 13 -->
                    <!-- ngIf: HbHr.hr295 && i.s_id > 12 -->
                    <option data-id="{{id}}" ng-if="HbHr.hr295 &amp;&amp; i.s_id > 12" value="7"
                            data-type="3"
                            path="loanIng" params="verifyArriv" param="s_name:已拒绝,id:707"
                            class="">订单毁约
                    </option><!-- end ngIf: HbHr.hr295 && i.s_id > 12 -->
                    <!-- ngIf: HbHr.hr111 -->
                    <option data-id="{{id}}" ng-if="HbHr.hr111" value="2" path="loanIng"
                            params="lotsLoad"
                            param="id:707,nowPage:historyList" class="">批量下载
                    </option><!-- end ngIf: HbHr.hr111 -->--%>
                    {{/each}}
                </select>
                <span class="se-po-blue"></span>
            </div>
            <!-- ngIf: HbHr.hr249 -->
            <button class="operations_record tabHint btnQuery707"
                    ng-click="F.btnQuery('btnQuery'+i.id);$event.stopPropagation();"
                    path="loanBefore" params="record" param="Table:t_order,tableId:707"
                    ng-if="HbHr.hr249" id="{{id}}">
                操作记录
            </button><!-- end ngIf: HbHr.hr249 -->
        </td>
    </tr>
    {{/each}}
    {{else}}
    <tr ng-if="data.content.list.length ==0" class="">
        <td colspan="16">暂时找不到数据</td>
    </tr>
    {{/if}}
</script>

<script type="text/javascript" src="static/js/jquery-plugin/jpager.js?_v=190102162154"></script>

<script type="text/javascript" src="static/js/page/loanIng/history_contract.js?_v=190102162154"></script>

<%@include file="../../common/web_bottom.jsp" %>

